package com.ims.core.doc.service;

import java.util.List;
import com.ims.core.doc.domain.TInDeductionStat;
import com.ims.core.doc.domain.TInDeductionStatApplyResult;

/**
 * 统计表Service接口
 *
 * @author IMS
 * @date 2024-12-11
 */
public interface ITInDeductionStatService
{
    /**
     * 查询统计表
     *
     * @param id 统计表主键
     * @return 统计表
     */
    public TInDeductionStat selectTInDeductionStatById(Long id);

    /**
     * 查询当前税期统计表
     *
     * @return 统计表
     */
    public TInDeductionStat selectCurrentDeductionstat();

    /**
     * 根据ID查询统计表
     * @param statId
     * @return
     */
    public TInDeductionStat selectTInDeductionStatByStatId(String statId);

    /**
     * 根据税期查询统计表
     * @param period
     * @return
     */
    public TInDeductionStat selectTInDeductionStatByPeriod(String period);

    /**
     * 查询统计表列表
     *
     * @param tInDeductionStat 统计表
     * @return 统计表集合
     */
    public List<TInDeductionStat> selectTInDeductionStatList(TInDeductionStat tInDeductionStat);

    /**
     * 新增统计表
     *
     * @param tInDeductionStat 统计表
     * @return 结果
     */
    public int insertTInDeductionStat(TInDeductionStat tInDeductionStat);

    /**
     * 修改统计表
     *
     * @param tInDeductionStat 统计表
     * @return 结果
     */
    public int updateTInDeductionStat(TInDeductionStat tInDeductionStat);

    /**
     * 自动生成下个税期的统计表
     */
    public void autoCreateInDeductionStatForNextPeriod();

    /**
     * 统计表生成申请
     * @param statId
     */
    public void applyTInDeductionStat(String statId);

    /**
     * 统计表生成撤销申请
     * @param statId
     */
    public void applyTInDeductionStatCancel(String statId);

    /**
     * 统计表确认申请
     * @param statId
     */
    public void applyConfirmTInDeductionStat(String statId);

    /**
     * 统计表确认申请取消
     * @param statId
     */
    public void applyConfirmTInDeductionStatCancel(String statId);

    /**
     * 同步统计表生成/撤销结果
     * @param applyId
     */
    public void syncDeductionStatApplyResultByApplyId(String applyId);

    /**
     * 同步统计表
     * @param id
     */
    public void syncDeductionStat(Long id);

    /**
     * 同步统计表生成/撤销结果
     * @param period
     * @param taskType
     * @param buyerTaxNo
     */
    public TInDeductionStatApplyResult syncDeductionStatApplyResult(String period, String taskType, String buyerTaxNo);

    /**
     * 同步统计表签名确认/取消结果
     * @param applyId
     */
    public void syncDeductionStatConfirmApplyResultByApplyId(String applyId);

    /**
     * 同步统计表签名确认/取消结果
     * @param period
     * @param taskType
     * @param buyerTaxNo
     */
    public TInDeductionStatApplyResult syncDeductionStatConfirmApplyResult(String period, String taskType, String buyerTaxNo);
}
